/** 
 * @date 06/05/2013
 * @author Renet_Pourriau
 * @version 1.0
 */

package ressource;

/**
 * This class represent allocation
 */
public class Allocation {
	
	private int nbAlloue;
	
	private TypeC type;

	/**
	 * this is the constructor of allocation
	 * @param nbAlloue
	 * @param type
	 */
	public Allocation(int nbAlloue, TypeC type) {
		this.setNbAlloue(nbAlloue);
		this.setType(type);
	}

	/**
	 * @return the nbAlloue
	 */
	public int getNbAlloue() {
		return nbAlloue;
	}

	/**
	 * @param nbAlloue the nbAlloue to set
	 */
	public void setNbAlloue(int nbAlloue) {
		this.nbAlloue = nbAlloue;
	}

	/**
	 * @return the type
	 */
	public TypeC getType() {
		return type;
	}

	/**
	 * @param type the type to set
	 */
	public void setType(TypeC type) {
		this.type = type;
	}
	
	/**
	 * @return String representing allocation
	 */
	public String getAllocation() {
		return "Nombre alloué : " + this.getNbAlloue() + "\n" + this.getType().getType();
	}
	
}